import { _decorator, Component, Node } from 'cc';
import { Item } from './Item';
const { ccclass, property } = _decorator;

// 材料类，继承自物品类
@ccclass('Material')
export class Material extends Item {

    itemType: string='材料';
    @property
    materialQuality: string = ''; // 添加材料品质属性

    constructor(name: string, description: string, quantity: number, itemType: string, materialQuality: string) {
        super(name, description, itemType, quantity); // 传递物品类型参数
        this.materialQuality = materialQuality; // 初始化材料品质属性
    }
}

